import React, { Component } from 'react'
import { Button } from 'antd'
import { useAppDispatch } from 'store/hooks'
import { set_list, fetchTest } from './dashboardSlice'

const Dashboard = () => {
  const dispatch = useAppDispatch()

  return (
    <div>
      dashBoard
      <Button
        onClick={() => {
          // dispatch(set_list('----'))
          // 调用异步action
          dispatch(fetchTest())
        }}
      >
        调用redux-测试redux-logger
      </Button>
    </div>
  )
}

export default Dashboard
